<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>职位详情 - 社交招聘平台</title>
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
  
  <style>
    body {
      background-color: #f5f5f5;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      padding-bottom: 70px;
    }
    
    /* 顶部导航 */
    .top-nav {
      background-color: white;
      padding: 12px 15px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.05);
      position: sticky;
      top: 0;
      z-index: 100;
    }
    
    .nav-title {
      font-size: 18px;
      font-weight: 600;
      text-align: center;
      margin: 0;
    }
    
    /* 公司信息 */
    .company-header {
      background-color: white;
      padding: 15px;
      display: flex;
      gap: 15px;
      border-bottom: 1px solid #eee;
    }
    
    .company-logo {
      width: 70px;
      height: 70px;
      border-radius: 8px;
      object-fit: cover;
      flex-shrink: 0;
    }
    
    .no-logo {
      width: 70px;
      height: 70px;
      border-radius: 8px;
      background-color: #f5f5f5;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #999;
      font-size: 28px;
      flex-shrink: 0;
    }
    
    .company-info {
      flex: 1;
    }
    
    .company-name {
      font-size: 17px;
      font-weight: 600;
      color: #333;
      margin-bottom: 3px;
    }
    
    .company-meta {
      font-size: 14px;
      color: #666;
      margin-bottom: 5px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }
    
    .company-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }
    
    .company-tag {
      padding: 2px 8px;
      border-radius: 4px;
      font-size: 12px;
      background-color: #f5f5f5;
      color: #666;
    }
    
    .follow-btn {
      align-self: center;
      white-space: nowrap;
    }
    
    /* 职位标题与核心信息 */
    .job-header {
      background-color: white;
      padding: 15px;
      border-bottom: 1px solid #eee;
    }
    
    .job-title {
      font-size: 20px;
      font-weight: 600;
      color: #333;
      margin-bottom: 10px;
      line-height: 1.3;
    }
    
    .salary {
      font-size: 18px;
      color: #dc3545;
      font-weight: 600;
      margin-bottom: 10px;
    }
    
    .job-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 15px;
      font-size: 14px;
      color: #666;
      margin-bottom: 10px;
    }
    
    .meta-item {
      display: flex;
      align-items: center;
      gap: 5px;
    }
    
    .meta-item i {
      color: #999;
      font-size: 14px;
    }
    
    /* 图片展示区 */
    .images-container {
      background-color: white;
      padding: 0 15px 15px;
      border-bottom: 1px solid #eee;
    }
    
    .images-title {
      font-size: 15px;
      color: #333;
      padding: 10px 0;
      margin: 0;
    }
    
    .single-image {
      width: 100%;
      border-radius: 8px;
      overflow: hidden;
    }
    
    .single-image img {
      width: 100%;
      height: 200px;
      object-fit: cover;
    }
    
    .multiple-images {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 5px;
    }
    
    .multi-image-item {
      aspect-ratio: 1;
      border-radius: 8px;
      overflow: hidden;
      position: relative;
    }
    
    .multi-image-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    
    .image-count {
      position: absolute;
      bottom: 5px;
      right: 5px;
      background-color: rgba(0,0,0,0.6);
      color: white;
      font-size: 12px;
      padding: 2px 5px;
      border-radius: 4px;
    }
    
    /* 职位详情内容 */
    .job-content {
      background-color: white;
      margin-top: 10px;
      border-radius: 12px 12px 0 0;
      overflow: hidden;
    }
    
    .content-section {
      padding: 15px;
      border-bottom: 1px solid #eee;
    }
    
    .section-title {
      font-size: 17px;
      font-weight: 600;
      color: #333;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .section-title i {
      color: #0d6efd;
    }
    
    .section-content {
      font-size: 15px;
      color: #555;
      line-height: 1.6;
    }
    
    .content-list {
      padding-left: 20px;
    }
    
    .content-list li {
      margin-bottom: 8px;
      line-height: 1.6;
    }
    
    .tag-container {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }
    
    .job-tag {
      padding: 4px 12px;
      background-color: #f0f7ff;
      color: #0d6efd;
      border-radius: 4px;
      font-size: 13px;
    }
    
    /* 联系方式 */
    .contact-info {
      background-color: #f9f9f9;
      padding: 12px 15px;
      border-radius: 8px;
      margin-top: 10px;
    }
    
    .contact-title {
      font-size: 14px;
      font-weight: 600;
      color: #333;
      margin-bottom: 8px;
    }
    
    .contact-item {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 14px;
      color: #555;
      margin-bottom: 5px;
    }
    
    /* 操作按钮 */
    .action-buttons {
      display: flex;
      padding: 12px 15px;
      background-color: white;
      border-top: 1px solid #eee;
      position: sticky;
      bottom: 60px;
      z-index: 90;
    }
    
    .action-btn {
      flex: 1;
      padding: 12px 0;
      border-radius: 8px;
      font-size: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      margin: 0 5px;
    }
    
    /* 留言区 */
    .comments-section {
      background-color: white;
      margin-top: 10px;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
      margin-bottom: 70px;
    }
    
    .comments-header {
      padding: 15px;
      border-bottom: 1px solid #eee;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    
    .comments-title {
      font-size: 16px;
      font-weight: 600;
      color: #333;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .comments-title i {
      color: #0d6efd;
    }
    
    .comments-count {
      font-size: 13px;
      color: #666;
      margin-left: 5px;
    }
    
    /* 留言输入框 */
    .comment-input-container {
      padding: 12px 15px;
      border-bottom: 1px solid #eee;
    }
    
    .comment-input-wrapper {
      display: flex;
      gap: 10px;
    }
    
    .user-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      object-fit: cover;
      flex-shrink: 0;
    }
    
    .no-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background-color: #f5f5f5;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #999;
      font-size: 16px;
      flex-shrink: 0;
    }
    
    .comment-input-box {
      flex: 1;
      position: relative;
    }
    
    .comment-input {
      width: 100%;
      padding: 10px 15px;
      border-radius: 20px;
      border: 1px solid #ddd;
      font-size: 14px;
      resize: none;
      height: 40px;
      transition: height 0.3s ease;
    }
    
    .comment-input:focus {
      outline: none;
      border-color: #0d6efd;
      height: 80px;
    }
    
    .input-actions {
      display: flex;
      justify-content: flex-end;
      margin-top: 8px;
      gap: 10px;
    }
    
    .input-action-btn {
      font-size: 14px;
      padding: 5px 12px;
      border-radius: 16px;
    }
    
    /* 留言列表 */
    .comments-list {
      padding: 0 15px;
      max-height: 400px;
      overflow-y: auto;
    }
    
    .comment-item {
      padding: 15px 0;
      border-bottom: 1px solid #eee;
      display: flex;
      gap: 10px;
    }
    
    .comment-item:last-child {
      border-bottom: none;
    }
    
    .comment-content {
      flex: 1;
    }
    
    .comment-header {
      display: flex;
      justify-content: space-between;
      margin-bottom: 5px;
    }
    
    .comment-author {
      font-size: 14px;
      font-weight: 600;
      color: #333;
    }
    
    .author-role {
      font-size: 12px;
      color: white;
      background-color: #0d6efd;
      padding: 1px 5px;
      border-radius: 3px;
      margin-left: 5px;
    }
    
    .comment-time {
      font-size: 12px;
      color: #999;
    }
    
    .comment-text {
      font-size: 14px;
      color: #555;
      margin-bottom: 8px;
      line-height: 1.5;
    }
    
    .comment-actions {
      display: flex;
      gap: 15px;
      font-size: 12px;
    }
    
    .comment-action {
      color: #666;
      display: flex;
      align-items: center;
      gap: 3px;
      cursor: pointer;
    }
    
    .comment-action:hover {
      color: #0d6efd;
    }
    
    /* 回复区域 */
    .replies-container {
      margin-top: 10px;
      padding-left: 15px;
      border-left: 2px solid #eee;
    }
    
    .reply-item {
      padding: 8px 0;
      display: flex;
      gap: 8px;
    }
    
    .reply-content {
      flex: 1;
      background-color: #f9fafb;
      padding: 8px 12px;
      border-radius: 12px;
      font-size: 13px;
    }
    
    .reply-author {
      font-weight: 600;
      color: #333;
      margin-right: 5px;
    }
    
    .reply-text {
      color: #555;
    }
    
    .reply-actions {
      display: flex;
      gap: 10px;
      margin-top: 5px;
      font-size: 11px;
      color: #666;
    }
    
    .reply-action {
      cursor: pointer;
    }
    
    .reply-action:hover {
      color: #0d6efd;
    }
    
    /* 底部导航 */
    .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background-color: white;
      border-top: 1px solid #eee;
      display: flex;
      padding: 8px 0;
      z-index: 100;
    }
    
    .nav-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      color: #999;
      font-size: 10px;
    }
    
    .nav-item.active {
      color: #0d6efd;
    }
    
    .nav-icon {
      font-size: 20px;
      margin-bottom: 3px;
    }
  </style>
</head>
<body>
  <!-- 顶部导航 -->
  <div class="top-nav d-flex justify-content-between align-items-center">
    <button class="btn btn-link p-0 text-dark" id="back-btn">
      <i class="fa fa-arrow-left"></i>
    </button>
    <h1 class="nav-title">职位详情</h1>
    <button class="btn btn-link p-0 text-dark">
      <i class="fa fa-share-alt"></i>
    </button>
  </div>
  
  <!-- 公司信息 -->
  <div class="company-header">
    <img src="https://picsum.photos/200/200?random=1" class="company-logo" alt="公司logo">
    <div class="company-info">
      <div class="company-name">科技有限公司</div>
      <div class="company-meta">
        <span>互联网 · 500-1000人</span>
        <span><i class="fa fa-map-marker"></i> 北京市朝阳区</span>
      </div>
      <div class="company-tags">
        <span class="company-tag">融资B轮</span>
        <span class="company-tag">技术驱动</span>
        <span class="company-tag">弹性工作</span>
      </div>
    </div>
    <button class="btn btn-outline-primary btn-sm follow-btn" id="follow-company">
      <i class="fa fa-plus"></i> 关注
    </button>
  </div>
  
  <!-- 职位标题与核心信息 -->
  <div class="job-header">
    <div class="job-title">高级前端开发工程师（Vue/React方向）</div>
    <div class="salary">15k-25k·13薪</div>
    <div class="job-meta">
      <div class="meta-item"><i class="fa fa-briefcase"></i> 全职</div>
      <div class="meta-item"><i class="fa fa-line-chart"></i> 3-5年</div>
      <div class="meta-item"><i class="fa fa-graduation-cap"></i> 本科</div>
      <div class="meta-item"><i class="fa fa-map-marker"></i> 朝阳区科技园</div>
      <div class="meta-item"><i class="fa fa-subway"></i> 距地铁10号线800米</div>
      <div class="meta-item"><i class="fa fa-clock-o"></i> 发布于 今天</div>
    </div>
  </div>
  
  <!-- 图片展示区 -->
  <div class="images-container">
    <h3 class="images-title">工作环境</h3>
    <div class="multiple-images">
      <div class="multi-image-item">
        <img src="https://picsum.photos/300/300?random=10" alt="办公环境1">
      </div>
      <div class="multi-image-item">
        <img src="https://picsum.photos/300/300?random=11" alt="办公环境2">
      </div>
      <div class="multi-image-item">
        <img src="https://picsum.photos/300/300?random=12" alt="办公环境3">
        <div class="image-count">5</div>
      </div>
    </div>
  </div>
  
  <!-- 职位详情内容 -->
  <div class="job-content">
    <div class="content-section">
      <h3 class="section-title"><i class="fa fa-list-alt"></i> 职位描述</h3>
      <div class="section-content">
        <ul class="content-list">
          <li>负责公司核心产品的前端架构设计和开发工作</li>
          <li>与产品经理、设计师和后端工程师紧密合作，打造高质量的用户体验</li>
          <li>优化前端性能，解决各种浏览器兼容性问题</li>
          <li>参与技术方案讨论和技术难点攻克</li>
          <li>指导初级开发工程师，提升团队整体技术水平</li>
        </ul>
      </div>
    </div>
    
    <div class="content-section">
      <h3 class="section-title"><i class="fa fa-check-square-o"></i> 任职要求</h3>
      <div class="section-content">
        <ul class="content-list">
          <li>本科及以上学历，计算机相关专业，3年以上前端开发经验</li>
          <li>精通HTML5、CSS3、JavaScript等前端基础技术</li>
          <li>深入理解Vue或React框架原理，有大型项目实践经验</li>
          <li>熟悉前端工程化和性能优化，有实际优化案例</li>
          <li>良好的沟通能力和团队协作精神，有责任心和解决问题的能力</li>
        </ul>
      </div>
    </div>
    
    <div class="content-section">
      <h3 class="section-title"><i class="fa fa-gift"></i> 福利待遇</h3>
      <div class="section-content">
        <ul class="content-list">
          <li>具有竞争力的薪资和年终奖金</li>
          <li>五险一金，带薪年假，节日福利</li>
          <li>定期团建活动，年度体检，员工旅游</li>
          <li>弹性工作时间，不打卡</li>
          <li>舒适的办公环境，零食饮料无限供应</li>
          <li>完善的晋升体系和职业发展通道</li>
        </ul>
      </div>
    </div>
    
    <div class="content-section">
      <h3 class="section-title"><i class="fa fa-tags"></i> 技能标签</h3>
      <div class="tag-container">
        <span class="job-tag">Vue.js</span>
        <span class="job-tag">React</span>
        <span class="job-tag">JavaScript</span>
        <span class="job-tag">HTML5</span>
        <span class="job-tag">CSS3</span>
        <span class="job-tag">Webpack</span>
        <span class="job-tag">前端工程化</span>
        <span class="job-tag">性能优化</span>
      </div>
    </div>
    
    <div class="content-section">
      <h3 class="section-title"><i class="fa fa-phone"></i> 联系方式</h3>
      <div class="contact-info">
        <div class="contact-title">招聘负责人：HR 王经理</div>
        <div class="contact-item">
          <i class="fa fa-phone"></i>
          <span>138****5678（工作日 9:00-18:00）</span>
        </div>
        <div class="contact-item">
          <i class="fa fa-envelope-o"></i>
          <span>wangjingli@company.com</span>
        </div>
        <div class="contact-item">
          <i class="fa fa-map-marker"></i>
          <span>北京市朝阳区科技园B座15层</span>
        </div>
      </div>
    </div>
  </div>
  
  <!-- 操作按钮 -->
  <div class="action-buttons">
    <button class="btn btn-outline-primary action-btn" id="collect-btn">
      <i class="fa fa-heart-o"></i> 收藏
    </button>
    <button class="btn btn-outline-secondary action-btn">
      <i class="fa fa-share-alt"></i> 分享
    </button>
    <button class="btn btn-primary action-btn">
      <i class="fa fa-paper-plane"></i> 立即申请
    </button>
  </div>
  
  <!-- 留言区 -->
  <div class="comments-section">
    <div class="comments-header">
      <h3 class="comments-title">
        <i class="fa fa-comments"></i> 求职咨询
        <span class="comments-count">(18)</span>
      </h3>
      <button class="btn btn-link p-0 text-dark">
        <i class="fa fa-sort"></i>
      </button>
    </div>
    
    <!-- 留言输入框 -->
    <div class="comment-input-container">
      <div class="comment-input-wrapper">
        <div class="no-avatar">
          <i class="fa fa-user"></i>
        </div>
        <div class="comment-input-box">
          <textarea class="comment-input" placeholder="有什么想了解的？"></textarea>
          <div class="input-actions">
            <button class="btn btn-outline-secondary input-action-btn">取消</button>
            <button class="btn btn-primary input-action-btn">发送</button>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 留言列表 -->
    <div class="comments-list">
      <!-- 留言1 - 官方回复 -->
      <div class="comment-item">
        <img src="https://picsum.photos/200/200?random=1" class="user-avatar" alt="公司头像">
        <div class="comment-content">
          <div class="comment-header">
            <div class="comment-author">
              科技有限公司 <span class="author-role">招聘方</span>
            </div>
            <div class="comment-time">今天 10:23</div>
          </div>
          <div class="comment-text">
            感谢大家对本职位的关注！我们团队正在快速扩张，欢迎有经验的前端工程师加入。关于职位的任何疑问，都可以在这里留言，我们会尽快回复。
          </div>
          <div class="comment-actions">
            <div class="comment-action"><i class="fa fa-thumbs-o-up"></i> 24</div>
            <div class="comment-action"><i class="fa fa-reply"></i> 回复</div>
          </div>
        </div>
      </div>
      
      <!-- 留言2 -->
      <div class="comment-item">
        <img src="https://picsum.photos/200/200?random=20" class="user-avatar" alt="用户头像">
        <div class="comment-content">
          <div class="comment-header">
            <div class="comment-author">张先生</div>
            <div class="comment-time">昨天 15:45</div>
          </div>
          <div class="comment-text">
            请问贵公司使用Vue还是React技术栈？我有4年React经验，想了解一下团队规模和项目情况。
          </div>
          <div class="comment-actions">
            <div class="comment-action"><i class="fa fa-thumbs-o-up"></i> 3</div>
            <div class="comment-action"><i class="fa fa-reply"></i> 回复</div>
          </div>
          
          <!-- 回复区 -->
          <div class="replies-container">
            <div class="reply-item">
              <img src="https://picsum.photos/200/200?random=1" class="user-avatar" alt="公司头像">
              <div class="reply-content">
                <span class="reply-author">科技有限公司</span>
                <span class="reply-text">我们主要使用React技术栈，前端团队目前有15人左右，负责公司核心产品和多个业务线的开发，项目包括移动端H5和PC端管理系统。</span>
                <div class="reply-actions">
                  <div class="reply-action">赞 (1)</div>
                  <div class="reply-action">回复</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 留言3 -->
      <div class="comment-item">
        <div class="no-avatar">
          <i class="fa fa-user"></i>
        </div>
        <div class="comment-content">
          <div class="comment-header">
            <div class="comment-author">李女士</div>
            <div class="comment-time">3天前</div>
          </div>
          <div class="comment-text">
            请问这个职位需要加班吗？是否接受远程办公？
          </div>
          <div class="comment-actions">
            <div class="comment-action"><i class="fa fa-thumbs-o-up"></i> 7</div>
            <div class="comment-action"><i class="fa fa-reply"></i> 回复</div>
          </div>
          
          <!-- 回复区 -->
          <div class="replies-container">
            <div class="reply-item">
              <img src="https://picsum.photos/200/200?random=1" class="user-avatar" alt="公司头像">
              <div class="reply-content">
                <span class="reply-author">科技有限公司</span>
                <span class="reply-text">我们原则上不鼓励加班，特殊项目阶段可能会有适当加班，会有加班费或调休。目前不支持完全远程办公，需要到岗工作。</span>
                <div class="reply-actions">
                  <div class="reply-action">赞 (2)</div>
                  <div class="reply-action">回复</div>
                </div>
              </div>
            </div>
            <div class="reply-item">
              <img src="https://picsum.photos/200/200?random=21" class="user-avatar" alt="用户头像">
              <div class="reply-content">
                <span class="reply-author">王先生</span>
                <span class="reply-text">我朋友在这家公司，说加班情况还好，主要看项目进度</span>
                <div class="reply-actions">
                  <div class="reply-action">赞 (0)</div>
                  <div class="reply-action">回复</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 留言4 -->
      <div class="comment-item">
        <img src="https://picsum.photos/200/200?random=22" class="user-avatar" alt="用户头像">
        <div class="comment-content">
          <div class="comment-header">
            <div class="comment-author">赵先生</div>
            <div class="comment-time">1周前</div>
          </div>
          <div class="comment-text">
            请问贵公司的晋升机制是怎样的？技术路线和管理路线是否都有发展空间？
          </div>
          <div class="comment-actions">
            <div class="comment-action"><i class="fa fa-thumbs-o-up"></i> 5</div>
            <div class="comment-action"><i class="fa fa-reply"></i> 回复</div>
          </div>
        </div>
      </div>
    </div>
  </div>
  
  <!-- 底部导航 -->
  <div class="bottom-nav">
    <a href="#" class="nav-item">
      <i class="fa fa-home nav-icon"></i>
      <span>首页</span>
    </a>
    <a href="#" class="nav-item active">
      <i class="fa fa-briefcase nav-icon"></i>
      <span>职位</span>
    </a>
    <a href="#" class="nav-item">
      <i class="fa fa-user-o nav-icon"></i>
      <span>我的</span>
    </a>
  </div>

  <!-- Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  
  <script>
    // 返回按钮功能
    document.getElementById('back-btn').addEventListener('click', function() {
      // 实际应用中会返回上一页
      history.back();
    });
    
    // 关注公司按钮切换
    document.getElementById('follow-company').addEventListener('click', function() {
      if (this.innerHTML.includes('关注')) {
        this.innerHTML = '<i class="fa fa-check"></i> 已关注';
        this.classList.remove('btn-outline-primary');
        this.classList.add('btn-secondary');
      } else {
        this.innerHTML = '<i class="fa fa-plus"></i> 关注';
        this.classList.remove('btn-secondary');
        this.classList.add('btn-outline-primary');
      }
    });
    
    // 收藏按钮功能
    document.getElementById('collect-btn').addEventListener('click', function() {
      const icon = this.querySelector('i');
      
      if (icon.classList.contains('fa-heart-o')) {
        icon.classList.remove('fa-heart-o');
        icon.classList.add('fa-heart', 'text-danger');
        this.textContent = ' 已收藏';
        this.prepend(icon);
      } else {
        icon.classList.remove('fa-heart', 'text-danger');
        icon.classList.add('fa-heart-o');
        this.textContent = ' 收藏';
        this.prepend(icon);
      }
    });
    
    // 留言点赞功能
    document.querySelectorAll('.comment-action .fa-thumbs-o-up').forEach(thumb => {
      thumb.addEventListener('click', function(e) {
        e.stopPropagation();
        const actionEl = this.parentElement;
        let count = parseInt(actionEl.textContent.trim().split(' ').pop());
        
        if (this.classList.contains('text-primary')) {
          this.classList.remove('text-primary');
          actionEl.innerHTML = `<i class="fa fa-thumbs-o-up"></i> ${count - 1}`;
        } else {
          this.classList.add('text-primary');
          actionEl.innerHTML = `<i class="fa fa-thumbs-o-up text-primary"></i> ${count + 1}`;
        }
      });
    });
    
    // 回复点赞功能
    document.querySelectorAll('.reply-action').forEach(action => {
      if (action.textContent.includes('赞')) {
        action.addEventListener('click', function(e) {
          e.stopPropagation();
          let count = parseInt(this.textContent.trim().split(' ')[1].replace('(', '').replace(')', ''));
          
          if (this.classList.contains('text-primary')) {
            this.classList.remove('text-primary');
            this.textContent = `赞 (${count - 1})`;
          } else {
            this.classList.add('text-primary');
            this.textContent = `赞 (${count + 1})`;
          }
        });
      }
    });
    
    // 回复功能
    document.querySelectorAll('.comment-action .fa-reply').forEach(replyIcon => {
      replyIcon.addEventListener('click', function(e) {
        e.stopPropagation();
        const commentItem = this.closest('.comment-item');
        const authorName = commentItem.querySelector('.comment-author').textContent.split(' ')[0];
        
        // 聚焦到输入框并填充回复前缀
        const commentInput = document.querySelector('.comment-input');
        commentInput.value = `回复 @${authorName}：`;
        commentInput.focus();
        commentInput.style.height = '80px';
        
        // 滚动到输入框
        commentInput.scrollIntoView({ behavior: 'smooth', block: 'center' });
      });
    });
    
    // 回复区内的回复功能
    document.querySelectorAll('.reply-action').forEach(action => {
      if (action.textContent.includes('回复')) {
        action.addEventListener('click', function(e) {
          e.stopPropagation();
          const replyItem = this.closest('.reply-item');
          const authorName = replyItem.querySelector('.reply-author').textContent;
          
          // 聚焦到输入框并填充回复前缀
          const commentInput = document.querySelector('.comment-input');
          commentInput.value = `回复 @${authorName}：`;
          commentInput.focus();
          commentInput.style.height = '80px';
          
          // 滚动到输入框
          commentInput.scrollIntoView({ behavior: 'smooth', block: 'center' });
        });
      }
    });
    
    // 发送留言功能
    document.querySelector('.input-action-btn.btn-primary').addEventListener('click', function() {
      const commentInput = document.querySelector('.comment-input');
      const commentText = commentInput.value.trim();
      
      if (commentText) {
        // 实际应用中会发送到服务器
        alert(`留言已发送：${commentText}`);
        commentInput.value = '';
        commentInput.style.height = '40px';
      }
    });
    
    // 取消留言功能
    document.querySelector('.input-action-btn.btn-outline-secondary').addEventListener('click', function() {
      const commentInput = document.querySelector('.comment-input');
      commentInput.value = '';
      commentInput.style.height = '40px';
    });
  </script>
</body>
</html>
